package com.neusoft.feign;

import org.springframework.stereotype.Component;

import java.math.BigDecimal;

@Component
public class VirtualWalletFeignClientCallBack implements VirtualWalletFeignClient {
    @Override
    public void transfer(Integer fromWalletId, Integer toWalletId, BigDecimal amount) {
        System.err.println("钱包转账服务不可用，触发降级");
        throw new RuntimeException("钱包转账服务不可用");
    }
    
    @Override
    public void credit(Integer walletId, BigDecimal amount) {
        System.err.println("钱包充值服务不可用，触发降级");
        throw new RuntimeException("钱包充值服务不可用");
    }
}
